import { Modal } from 'antd';

export default function (response) {
  if (response.data.code >= 500) {
    Modal.error({
      content: `服务器处理异常，请稍后重试 -- ${response.data.code}`,
      maskClosable: true
    });
    throw response;
  }
  return response;
}
